part of _;

extension on ShowVideoPage {
  Widget view_close() {
    Widget view() {
      return YInkRoundButton(Icon(Icons.close, color: Colors.white), onTap: () => yFinish());
    }

    return defaultTargetPlatform == TargetPlatform.macOS
        ? Positioned(
            top: yStatubarHeight(context: context) + 10,
            left: 10,
            child: view(),
          )
        : Positioned(
            top: yStatubarHeight(context: context) + 10,
            right: 10,
            child: view(),
          );
  }

  Widget view_video() {
    return MouseMenu(
      items: [
        PopupMenuItem(
          child: Row(
            children: [
              const Icon(Icons.save_alt_rounded, color: Colors.black, size: 20),
              YSpacer(width: 10),
              const Text("保存视频", style: TextStyle(color: Colors.black, fontSize: 14)),
            ],
          ),
          onTap: () => controller_save(),
        ),
      ],
      child: Container(
        width: yScreenSize().width,
        height: yScreenSize().height,
        color: Colors.black,
        child: Stack(
          alignment: Alignment.center,
          children: [
            Container(
              width: yScreenSize().width,
              color: Colors.black,
              child: MeeduVideoPlayer(controller: meeduPlayerController),
            ),
          ],
        ),
      ),
    );
  }
}
